﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Collections;

/*
 * // protected static String _connectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=QuanLyHocSinh.mdb";
 * // protected static String _connectionString = @"Provider=SQLOLEDB;Data Source=(local)\SQLEXPRESS2005;Initial Catalog=QuanLyHocSinh;User Id=sa;Password=123456;"; 
 * // protected static String _connectionString = @"Provider=SQLOLEDB;Data Source=(local)\SQLEXPRESS2005;Initial Catalog=QuanLyHocSinhSQL;User Id=sa;Password=123456;";
 * // protected static String _connectionString = @"Data Source=(local)\SQLEXPRESS2005;Initial Catalog=QuanLyHocSinhSQL;User Id=sa;Password=123456;"; 
 * // protected static String _connectionString = @"Provider=SQLOLEDB;Data Source=(local);Initial Catalog=QuanLyHocSinh;User Id=sa;Password=123456;"; 
 * // protected static String _connectionString = @"Data Source=.\SQLEXPRESS2005;AttachDbFilename=f:\TEACHING\NMCNPM\NMCNPM-08TC\Tuan4\QuanLyHocSinh_v3\QuanLyHocSinh\QuanLyHocSinh\QLHS.mdf;Integrated Security=True;User Instance=True";
 * 
 * // For trusted connection:
 * // OleDb: "Provider=SQLOLEDB;Data Source=Your_Server_Name;Initial Catalog=Your_Database_Name;Integrated Security=SSPI;" 
 * // Sql: "Data Source=Your_Server_Name;Initial Catalog=Your_Database_Name;Integrated Security=SSPI;" 
 * */

namespace QuanLyKhachSan
{
    public abstract class DataAccessHelper
    {
        protected string strConnection;
        public abstract DataTable ExecuteQuery(string strQuery);
        public abstract void ExecuteNonQuery(string strQuery);
        public abstract int ExecuteNonQuery1 (string strQuery);
        public abstract DataTable ExecuteProcedure(string storeProcName, Dictionary<string, object> para);
        public abstract List<string> ExecuteNonProcedure(string storeProcName, Dictionary<string, object> para,List<ParameterDirection> paraDir);
        public abstract int ExecuteNonProcedure(string storeProcName, Dictionary<string, object> para);

    }
}

